<template>
    <div class="adress postafter">
       
        	<postHead active="home" :showAction="true" v-if="$root.userInfo.type=='1'"></postHead>
            <userHead active="jianli" :showAction="true" v-if="$root.userInfo.type=='2'"></userHead>
            <div class="overdiv">

           
                <div class="container container-fixwidth">
                    <div class="main-left">

                        <div class="postafter-lt">
                            <div class="jobhead" style="padding-bottom:0px">
                                <div class="jobtitle">
                                    <p>
                                        <span class="jobtitle-info">{{postInfo.name}}</span> <span class="rank" v-if="postInfo.positionRank">职级：{{postInfo.positionRank}}</span>
                                    </p>
                                    <p class="jobtitle-label" style="font-size: 20px">
                                        <span v-if="postInfo.subsidiary.id">{{postInfo.subsidiary.name}}&gt;{{postInfo.department}}</span>
                                        <span v-else>{{postInfo.enterprise.name}}&gt;{{postInfo.department}}</span>
                                    </p>
                                </div>
                                <div class="pull-right">
                                    <div class="pay pay_div" style="margin-bottom:20px">
                                        <div class="workspace">
                                            <span>{{getWorkSpace(postInfo.workPlaceName)}}</span>
                                        </div>
                                        <span v-if="postInfo.preTaxAnnualSalaryStart && postInfo.preTaxAnnualSalaryEnd">
                                            {{postInfo.preTaxAnnualSalaryStart}}万-{{postInfo.preTaxAnnualSalaryEnd}}万
                                        </span>
                                        
                                    </div>
                                    <div class="pay" style="margin-bottom:20px" v-if="postMain.status==1"><span>{{postMain.refreshTime?postMain.refreshTime.substring(0,16):""}} <span style="font-size:22px">发布</span></span> </div>  
                                </div>
                                <span class="caret"></span>
                            </div>
                            <!-- /.jobhead -->

                            <div class="jobinfo">
                                <div class="jobinfo-op">
                                    <div class="jobinfo-op-state">
                                        <div class="pay">{{postInfo.preTaxAnnualSalaryStart}}万-{{postInfo.preTaxAnnualSalaryEnd}}万</div>
                                     
                                        <div class="viewdat">
                                          
                                        </div>
                                      
                                    </div>

                                    <div class="jobinfo-op-links" style="margin-top: 30px;">
                                        
                                            <div v-if="$root.userInfo.type=='1'">
                                                
                                                    <a class="btn btn-default" @click="toEdit">编&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;辑</a>
                                                
                                                
                                                    <a class="btn btn-default publishnow" v-if="postMain.status==0" @click="stopPost(1)">立即发布</a>
                                                
                                                
                                                    <a class="btn btn-default stoppublish" v-if="postMain.status==1" @click="stopPost(0)">停止发布</a>
                                                
                                                    <a class="btn btn-default publishnow" @click="loadPost">刷新岗位</a>
                                                    <a class="btn btn-default deletejob" @click="deletePost">删除岗位</a>
                                                
                                            </div>

                                            <div v-if="$root.userInfo.type=='2'">
                                                
                                                <a class="btn btn-default" @click="toSendResume">申请职位</a>
                                            
                                                <a class="btn btn-default" @click="showSendPost">岗位推荐</a>
                                                
                                                <a class="btn btn-default publishnow" >收藏职位</a>
                                                <a class="btn btn-default deletejob" >收藏企业</a>
                                                
                                            </div>

                                    </div>


                                </div>

                                <div class="post_img" v-if="postInfo.postImg">
                                    <img :src="'https://www.aizhaopin.pro/prod-api/sys/common/static/'+postInfo.postImg">
                                </div>
                           
                                <!-- /.jobinfo-op -->

                                <!-- 企业介绍 -->
                                <div class="jobinfo-item" v-if="postInfo.subsidiary.id">
                                    <div class="register-tag">岗位所属公司</div>
                                    
                                    
                                    <p class="jobinfo-text" v-if="postInfo.subsidiary.introduction" >{{postInfo.subsidiary.introduction?postInfo.subsidiary.introduction:''}}</p>
                                    

                                    <ul class="jobinfo-list" v-if="postInfo.subsidiary.enterpriseIndustry || postInfo.subsidiary.enterpriseNature || postInfo.subsidiary.enterpriseNature || postInfo.subsidiary.staffsNum || postInfo.subsidiary.listingType || postInfo.subsidiary.enterpriseScale">
                                        <li v-if="postInfo.subsidiary.enterpriseIndustry">
                                            <div class="jobstate" style="width: 100%">
                                                <span style="width: 112px">所在行业：</span><span>{{postInfo.subsidiary.enterpriseIndustry}}</span>
                                            </div>
                                        </li>
                                        <li v-if=" postInfo.subsidiary.annualRevenue || postInfo.subsidiary.enterpriseScale">
                                           
                                            <div class="jobstate" v-if="postInfo.subsidiary.enterpriseScale">
                                                <span>企业规模：</span><span>{{postInfo.subsidiary.enterpriseScale}}</span>
                                            </div>
                                             <div class="jobstate" v-if="postInfo.subsidiary.annualRevenue">
                                                <span>企业营收：</span>
                                                <span v-if="postInfo.subsidiary.annualRevenue<10000">{{postInfo.subsidiary.annualRevenue}}万元</span>
                                                <span v-else >{{postInfo.subsidiary.annualRevenue/10000}}亿</span>
                                            </div>
                                        </li>
                                        <li v-if="postInfo.subsidiary.enterpriseNature || postInfo.subsidiary.enterpriseNature || postInfo.subsidiary.staffsNum">
                                           
                                            <div class="jobstate" v-if="postInfo.subsidiary.enterpriseNature">
                                                <span>企业性质：</span><span>{{postInfo.subsidiary.enterpriseNature}}</span>
                                            </div>
                                            <div class="jobstate" v-if="postInfo.subsidiary.staffsNum">
                                                <span>员工总数：</span><span>{{postInfo.subsidiary.staffsNum}}</span>
                                            </div>
                                        </li>

                                         <li v-if="postInfo.subsidiary.listingType">
                                           
                                            <div class="jobstate" v-if="postInfo.subsidiary.listingType">
                                                <span>上市类型：</span><span>{{postInfo.subsidiary.listingType}}</span>
                                            </div>
                                        </li>

                                      
                                          
                                       
                                    </ul>
                                </div>
                                <div class="jobinfo-item" v-else>
                                     <div class="register-tag">企业介绍</div>
                                    
                                    
                                    <p class="jobinfo-text" v-if="postInfo.enterprise.introduction" v-html="postInfo.enterprise.introduction"></p>
                                    

                                    <ul class="jobinfo-list" v-if="postInfo.enterprise.enterpriseIndustry || postInfo.enterprise.enterpriseNature || postInfo.enterprise.enterpriseNature || postInfo.enterprise.staffsNum || postInfo.enterprise.listingType || postInfo.enterprise.enterpriseScale">
                                        <li v-if="postInfo.enterprise.enterpriseIndustry">
                                            <div class="jobstate" style="width: 100%">
                                                <span style="width: 112px">所在行业：</span><span>{{postInfo.enterprise.enterpriseIndustry}}</span>
                                            </div>
                                        </li>
                                        <li v-if="postInfo.enterprise.enterpriseNature || postInfo.enterprise.staffsNum">
                                            <div class="jobstate" v-if="postInfo.enterprise.enterpriseNature">
                                                <span>企业性质：</span><span>{{postInfo.enterprise.enterpriseNature}}</span>
                                            </div>
                                            <div class="jobstate" v-if="postInfo.enterprise.staffsNum">
                                                <span>员工总数：</span><span>{{postInfo.enterprise.staffsNum}}</span>
                                            </div>
                                        </li>
                                        <li v-if="postInfo.enterprise.listingType || postInfo.enterprise.enterpriseScale">
                                            <div class="jobstate" v-if="postInfo.enterprise.listingType">
                                                <span>上市类型：</span><span>{{postInfo.enterprise.listingType}}</span>
                                            </div>
                                            <div class="jobstate" v-if="postInfo.enterprise.enterpriseScale">
                                                <span>企业规模：</span><span>{{postInfo.enterprise.enterpriseScale}}</span>
                                            </div>
                                        </li>
                                        <li v-if="postInfo.enterprise.annualRevenue">

                                            <div class="jobstate" v-if="postInfo.enterprise.annualRevenue">
                                                <span>企业营收：</span>
                                                <span v-if="postInfo.enterprise.annualRevenue<10000">{{postInfo.enterprise.annualRevenue}}万元</span>
                                                 <span v-else >{{postInfo.enterprise.annualRevenue/10000}}亿</span>
                                            </div>
                                        </li>
                                       
                                    </ul>
                                </div>
                                <!-- /.jobinfo-item -->

                                  <div class="jobinfo-item" v-if="moneyInfo.money">
                                    <div class="register-tag">悬赏金：</div>

                                    <div class="mony_div" >
                                        <div class="md_head">
                                            <span>悬赏金</span>
                                            <span style="font-size: .68rem;color: #333;margin: 0 .1067rem;">{{postInfo.money}}</span>
                                            <span>人民币</span>

       

                                            <span style="margin-left: 60px; ">已发放</span>
                                             <span style="font-size: .68rem;color: #333;margin: 0 .1067rem;">{{moneyInfo.distributionMoney}}</span>
                                            <span >人民币</span>
                                        </div>
                                        <div class="md_desc q-loading-2-inner">
                                            <template v-for="(item,index) in spanList">
                                                <span :key="index" :class="{bigSpan:index==nowIndex}">{{item}}</span>
                                            </template> ！！！
                                        
                                        </div>
                                    </div>
                                       <!-- <ul class="jobinfo-list">
                                            <li>
                                                <div class="jobstate">
                                                    <span>赏金总额：</span><span>{{moneyInfo.money}}元人民币</span>
                                                </div>
                                                <div class="jobstate">
                                                    <span>已发金额：</span><span>{{moneyInfo.distributionMoney}}元人民币</span>
                                                </div>
                                            </li>
                                            <li>
                                                <div class="jobstate"  style="width: 100%">
                                                    <span style="width: 112px">悬赏说明：</span><span>若发现企业有逃单行为，需按照悬赏金的200%支付奖金，并进行全网及职查查征信平台公示。</span>
                                                </div>
                                            
                                            </li>
                                        </ul> -->
                                </div>


                                <!-- 基本信息 -->
                                <div class="jobinfo-item">
                                    <div class="register-tag">基本信息</div>
                                    <ul class="jobinfo-list">
                                        <li v-if="postInfo.workPlaceName || postInfo.num">
                                            <div class="jobstate" v-if="postInfo.workPlaceName">
                                                <span>工作地点：</span><span>{{getWorkSpace(postInfo.workPlaceName)}}</span>
                                            </div>
                                            <div class="jobstate" v-if="postInfo.num">
                                                <span>招聘数量：</span><span>{{postInfo.num}}</span>
                                            </div>
                                        </li>
                                        <li v-if="postInfo.reason || postInfo.department">
                                            <div class="jobstate" v-if="postInfo.reason">
                                                <span>招聘原因：</span><span>{{postInfo.reason}} </span>
                                            </div>
                                            <div class="jobstate" v-if="postInfo.department">
                                                <span>所属部门：</span><span>{{postInfo.department}}</span>
                                              
                                            </div>
                                        </li>
                                        <li v-if="getPostInfoMain(postMain.postType,'postType') || postInfo.positionRank">
                                            <div class="jobstate" v-if="getPostInfoMain(postMain.postType,'postType')">
                                                <span>岗位类型：</span><span>{{getPostInfoMain(postMain.postType,'postType')}}</span>
                                            </div>
                                            <div class="jobstate" v-if="postInfo.positionRank">
                                                <span>岗位职级：</span><span>{{postInfo.positionRank}}</span>
                                            </div>
                                        </li>
                                        <li v-if="postInfo.functionalAffiliation || postInfo.directSuperiorRank">
                                            <div class="jobstate" v-if="postInfo.functionalAffiliation">
                                                <span>岗位职能：</span><span>{{postInfo.functionalAffiliation}}</span>
                                            </div>
                                            <div class="jobstate" v-if="postInfo.directSuperiorRank">
                                                <span>直接上级职级：</span><span>{{postInfo.directSuperiorRank}}</span>
                                            </div>
                                        </li>
                                        <li v-if="postInfo.directSuperiorIntroduction || postMain.subordinateSituation">
                                            <div class="jobstate" v-if="postInfo.directSuperiorIntroduction" style="width:100%">
                                                <span>直接上级简介：</span><span>{{postInfo.directSuperiorIntroduction}}</span>
                                            </div>
                                            <div class="jobstate" v-if="postMain.subordinateSituation">
                                                <span>下属情况：</span><span> {{postMain.subordinateSituation}}</span>
                                            </div>
                                        </li>
                                           
                                            <!-- <div class="jobstate" v-if="postInfo.name">
                                                <span>岗位名称：</span><span>{{postInfo.name}}</span>
                                            </div> -->
                                            
                                           
                                        <li v-if="postMain.equalPost">
                                            <div class="jobstate" v-if="postMain.equalPost">
                                                <span>平级岗位：</span><span>{{postMain.equalPost}}</span>
                                            </div>
                                           
                                        </li>

                                    </ul>
                                </div>
                                <!-- /.jobinfo-item -->

             
                               
                                <!-- /.jobinfo-item -->

                                <div class="jobinfo-item" v-if="postInfo.jobDescription">
                                    <div class="register-tag">岗位职责</div>
                                    <div class="jobinfo-content">
                                        <div class="demand" v-html="postInfo.jobDescription"></div>
                                    </div>
                                </div>
                                 <div class="jobinfo-item" v-if="postInfo.preTaxAnnualSalaryStart && postInfo.preTaxAnnualSalaryEnd">
                                    <div class="register-tag">薪资待遇</div>
                                    <ul class="jobinfo-list">
                                        <li v-if="postInfo.preTaxMonthlySalaryStart && postInfo.preTaxMonthlySalaryEnd">
                                            <div class="jobstate">
                                                <span>税前年薪：</span><span>{{postInfo.preTaxAnnualSalaryStart}}万-{{postInfo.preTaxAnnualSalaryEnd}}万</span>
                                            </div>
                                            <div class="jobstate" v-if="postInfo.preTaxMonthlySalaryStart && postInfo.preTaxMonthlySalaryEnd">
                                                <span>其中税前月薪：</span><span>{{postInfo.preTaxMonthlySalaryStart}}K-{{postInfo.preTaxMonthlySalaryEnd}}K</span>
                                            </div>
                                        </li>
                                        <li v-if="postInfo.subsidyWelfare || getPostInfoMain(postMain.equityIncentive,'equityIncentive')">
                                            <div class="jobstate" v-if="postInfo.subsidyWelfare">
                                                <span>补贴福利：</span><span >{{postInfo.subsidyWelfare}}</span>
                                                
                                            </div>
                                            <div class="jobstate" v-if="getPostInfoMain(postMain.equityIncentive,'equityIncentive')">
                                                <span>股权激励情况：</span><span>{{getPostInfoMain(postMain.equityIncentive,'equityIncentive')}}</span>
                                            </div>
                                        </li>
                                        <li v-if="postInfo.workTime || postInfo.travelFrequency">
                                            <div class="jobstate" v-if="postInfo.workTime">
                                                <span>作息时间：</span><span>{{postInfo.workTime}}</span>
                                            </div>
                                            <div class="jobstate" v-if="postInfo.travelFrequency">
                                                <span>出差频率：</span><span>{{postInfo.travelFrequency}}</span>
                                            </div>
                                        </li>
                                    </ul>
                                </div>



                                <!-- 岗位要求 -->
                                <div class="jobinfo-item" v-if="postInfo.ageStart || postInfo.ageEnd || postMain.lowestAcademic || postInfo.universityType.length>0 || postMain.universityQualificationType || postInfo.masterSchoolType.length>0 || postMain.masterQualificationType || postInfo.doctorSchoolType.length>0 || postMain.doctorQualificationType || postMain.fromSchool || postMain.professionalRequirements">
                                    <div class="register-tag">学历/专业等要求</div>
                                    <ul class="jobinfo-list">
                                        <li v-if="postInfo.ageStart || postInfo.ageEnd || postMain.lowestAcademic">
                                            <div class="jobstate" v-if="postInfo.ageStart || postInfo.ageEnd">
                                                <span>年龄：</span><span>{{postInfo.ageStart}}-{{postInfo.ageEnd}}岁</span>
                                            </div>
                                              <div class="jobstate" v-if="postMain.lowestAcademic">
                                                <span>最低学历要求：</span><span>{{getPostInfoMain(postMain.lowestAcademic,'qualification')}}</span>
                                            </div>
                                        </li>
                                        <li v-if="postInfo.universityType.length>0">
                                            <div class="jobstate"  style="width:100%">
                                                <span>其中本科要求：</span>
                                                <span>
                                                    {{postInfo.universityType.length>0?postInfo.universityType.join(' 或 '):'不限'}}
                                                    <span> , {{postMain.universityQualificationType?getPostInfoMain(postMain.universityQualificationType,'qualificationType'):"不限"}}</span>
                                                </span>
                                            </div>
                                        </li>
                                        <li v-if="postInfo.masterSchoolType.length>0">
                                            <div class="jobstate"  style="width:100%">
                                                <span>其中硕士要求：</span>
                                                <span>
                                                    {{postInfo.masterSchoolType.length>0?postInfo.masterSchoolType.join(' 或 '):'不限'}}
                                                    <span> , {{postMain.masterQualificationType?getPostInfoMain(postMain.masterQualificationType,'qualificationType'):"不限"}}</span>
                                                </span>
                                            </div>
                                           
                                        </li>
                                        <li v-if="postInfo.doctorSchoolType.length>0">
                                            <div class="jobstate" >
                                                <span>其中博士要求：</span>
                                                <span>
                                                    {{postInfo.doctorSchoolType.length>0?postInfo.doctorSchoolType.join(' 或 '):'不限'}}
                                                    <span> , {{postMain.doctorQualificationType?getPostInfoMain(postMain.doctorQualificationType,'qualificationType'):'不限'}}</span>
                                                </span>
                                            </div>
                                        </li>
                                           
                                           
                                        <li v-if="postMain.fromSchool || postMain.professionalRequirements">
                                         
                                            <div class="jobstate" v-if="postMain.fromSchool">
                                                <span>希望来自学校：</span><span>{{postMain.fromSchool}}</span>
                                            </div>
                                            <div class="jobstate" v-if="postMain.professionalRequirements">
                                                <span>专业要求：</span><span>{{postMain.professionalRequirements}}</span>
                                            </div>
                                        </li>

                                    </ul>
                                </div>
                                
                                <!-- /.jobinfo-item -->

                                <!-- 其它要求 -->
                                <div class="jobinfo-item" v-if="postInfo.experienceRequirements.workYear">
                                    <div class="register-tag">行业、岗位经验整体要求</div>
                                    <div class="jobinfo-content">
                                        <div class="demand">
                                            <p>工作<span class="boldSpan">{{postInfo.experienceRequirements.workYear}}</span>年以上,其中：</p>
                                     
                                            <template v-for="json in postInfo.experienceRequirements.items">
                                               
                                                <p v-if="json.industry.length>0">在<span class="boldSpan">{{json.industry.join(' 或 ')}}</span>行业中,</p>


                                                <p v-if="json.enterpriseScale.length || json.enterpriseNature.length || json.listingType.length"><span v-if="json.industry.length==0">在</span> <span v-if="json.enterpriseNature.length "><span class="boldSpan">{{json.enterpriseNature.join(' 或 ')}}</span>,</span><span v-if="json.enterpriseScale.length"><span class="boldSpan" >{{json.enterpriseScale.join(' 或 ')}}</span>,</span> <span v-if="json.listingType.length"><span class="boldSpan">{{json.listingType.join(' 或 ')}}</span>,</span>企业中,</p>
 
                                                <p v-if="json.staffsNum || json.annualRevenue">
                                                    <span v-if="json.staffsNum">且企业人数不低于<span class="boldSpan">{{json.staffsNum}}</span>人,</span>
                                                    <span v-if="json.annualRevenue">企业营收（产能）不低于
                                                        <span v-if="json.annualRevenue<10000"> <span class="boldSpan" >{{json.annualRevenue}}</span>万元,</span>

                                                        <span v-else>
                                                            <span class="boldSpan" >{{json.annualRevenue/10000}}</span>亿,
                                                        </span>
                                                        
                                                    </span>
        
                                                </p>

                                                <p v-if="json.functionalAffiliation.length>0 || json.positionRank.length>0 || json.engagedYear">从事<span class="boldSpan">{{json.functionalAffiliation.join(' 或 ')}}</span>方向的工作,<span v-if="json.positionRank.length>0">且担任：<span class="boldSpan">{{json.positionRank.join(" 或 ")}}</span></span><span v-if="json.engagedYear"><span class="boldSpan">{{json.engagedYear}}</span>年以上</span>。</p>
                                              
                                                
                                            </template>
                                            <p v-if="postInfo.experienceRequirements.annualSalaryNotLess">目前年薪不低于<span class="boldSpan">{{postInfo.experienceRequirements.annualSalaryNotLess}}</span>万。</p>
                                            
                                             <p v-if="postInfo.experienceRequirements.careerStability">职业稳定度<span class="boldSpan">{{postInfo.experienceRequirements.careerStability}}</span>。</p>
                                           
                                            
                                            
                                        </div>
                                        <!-- /.demand -->

                                    </div>
                                    <!-- /.jobinfo-content -->
                                </div>

                                
                                <template v-for="item in postInfo.jobRequirementsKeyUnits">
                                 <div class="jobinfo-item" v-if="item.inRecentYear">
                                    <div class="register-tag">关键单位、岗位任职要求</div>
                                    <div class="jobinfo-content">
                                        <div class="demand">

                                            <p v-if="item.inRecentYear">近<span class="boldSpan">{{item.inRecentYear}}</span>年内,<span v-if="item.company">在<span class="boldSpan">{{item.company}}</span>,</span></p>
                                     
                                            <p v-if="item.enterpriseIndustry.length">在<span class="boldSpan">{{item.enterpriseIndustry.join(' 或 ')}}</span>行业中<span v-if="item.enterpriseScale.length || item.enterpriseNature.length || item.listingType.length">的</span></p>
                                            <p v-if="item.enterpriseScale.length || item.enterpriseNature.length || item.listingType.length"><span v-if="item.enterpriseIndustry.length==0">在</span> <span v-if="item.enterpriseNature.length "><span class="boldSpan">{{item.enterpriseNature.join(' 或 ')}}</span>,</span><span v-if="item.enterpriseScale.length"><span class="boldSpan" >{{item.enterpriseScale.join(' 或 ')}}</span>,</span> <span v-if="item.listingType.length"><span class="boldSpan">{{item.listingType.join(' 或 ')}}</span></span>企业中,</p>
 
                                            <p v-if="item.staffsNum || item.annualRevenue">
                                                <span v-if="item.staffsNum">且企业人数不低于<span class="boldSpan">{{item.staffsNum}}</span>人,</span>
                                                <span v-if="item.annualRevenue">企业营收（产能）不低于
                                                    <span v-if="item.annualRevenue<10000"> <span class="boldSpan" >{{item.annualRevenue}}</span>万元,</span>

                                                    <span v-else>
                                                        <span class="boldSpan" >{{item.annualRevenue/1000}}</span>亿,
                                                    </span>
                                                    
                                                </span>
    
                                            </p>
                                            <p v-if="item.functionalAffiliation.length ||item.postRank.length || item.workYear">
                                                <span v-if="item.functionalAffiliation.length">从事:<span class="boldSpan">{{item.functionalAffiliation.join(' 或 ')}}</span>方向的工作,</span>
                                                <span v-if="item.postRank.length">且担任<span class="boldSpan">{{item.postRank.join(' 或 ')}}</span>,</span>
                                            
                                                <span v-if="item.workYear"><span class="boldSpan">{{item.workYear}}</span>年以上。</span>
                                            </p>
                                          

                                            <p v-if="item.numberManagers">
                                             
                                                <span v-if="item.numberManagers">管理人数不低于<span class="boldSpan">{{item.numberManagers}}</span>人。</span>
                                              
    
                                            </p>
                                         
                                        </div>
                                        <!-- /.demand -->

                                    </div>
                                    <!-- /.jobinfo-content -->
                                </div>
                                </template>
                              
                                <!-- /.jobinfo-item -->
                                <div class="jobinfo-item" v-if="postMain.certificateOne || postMain.certificateTwo">
                                    <div class="register-tag">证书要求</div>
                                    <ul class="jobinfo-list" >
                                        <li>
                                            <div class="jobstate" v-if="postMain.certificateOne">
                                                <span>同时持有证书：</span><span>{{postMain.certificateOne}}</span>
                                            </div>
                                            <div class="jobstate" v-if="postMain.certificateTwo">
                                                <span>或持有证书：</span><span>{{postMain.certificateTwo}}</span>
                                            </div>
                                        </li>
                                     </ul>
                             
                                </div>

                                <div class="jobinfo-item" v-if="postMain.languageAbilityOne || postMain.languageOneRequirements || postMain.languageAbilityTwo || postMain.languageTwoRequirements">
                                    <div class="register-tag">语言要求</div>
                                    <ul class="jobinfo-list">
                                        <li>
                                            <div class="jobstate" v-if="postMain.languageAbilityOne">
                                                <span>具备语言能力：</span><span>{{getPostInfoMain(postMain.languageAbilityOne,'language')}}</span>
                                            </div>
                                            <div class="jobstate" v-if="postMain.languageOneRequirements">
                                                <span>语言要求</span><span>{{getPostInfoMain(postMain.languageOneRequirements,'languageAbility')}}</span>
                                            </div>
                                        </li>
                                        <li>
                                             <div class="jobstate" v-if="postMain.languageAbilityTwo">
                                                <span>或具备语言能力：</span><span>{{getPostInfoMain(postMain.languageAbilityTwo,'language')}}</span>
                                            </div>
                                            <div class="jobstate" v-if="postMain.languageTwoRequirements">
                                                <span>语言要求：</span><span>{{getPostInfoMain(postMain.languageTwoRequirements,'languageAbility')}}</span>
                                            </div>
                                        </li>
                                       
                                      
                                       
                                     </ul>
                                    <!-- /.jobinfo-content -->
                                </div>


                                <div class="jobinfo-item" v-if="postInfo.currentWorkplaceRequirements || postInfo.previousWorkplaceRequirements || postInfo.settlementRequirements">
                                    <div class="register-tag">地点要求</div>
                                    <ul class="jobinfo-list">
                                       
                                        <li>
                                            <div class="jobstate" style="width:100%">
                                                <span>现工作地为：</span><span>{{getSpaceInfo(postInfo.currentWorkplaceRequirements)}}</span>
                                            </div>
                                        </li>
                                        <li>
                                            <div class="jobstate" style="width:100%">
                                                <span>曾经工作地为：</span>{{ getSpaceInfo(postInfo.previousWorkplaceRequirements) }}<span></span>
                                            </div>
                                        </li>
                                        <li>
                                            <div class="jobstate" style="width:100%">
                                                <span>定居为：</span><span>{{ getSpaceInfo(postInfo.settlementRequirements) }}</span>
                                            </div>
                                        </li>
                                      
                                     </ul>
                                    <!-- /.jobinfo-content -->
                                </div>
                                <div class="jobinfo-item" v-if="getOther(postInfo.experienceRequirements.otherRequirements)">
                                    <div class="register-tag">其他要求</div>
                                    <div class="jobinfo-content">
                                       
                                        <div class="demand" v-html="postInfo.experienceRequirements.otherRequirements">
                                           
  
                                            
                                        </div>
                                        <!-- /.demand -->

                                    </div>
                                    <!-- /.jobinfo-content -->
                                </div>

                                <div class="jobinfo-item" v-if="postMain.jobRecruitmentManager">
                                    <div class="register-tag">招聘负责人：<span style="font-weight: 400;">{{postMain.jobRecruitmentManager}}</span></div>
                                  
                                </div>


                            </div>
                            <!-- /.jobinfo -->

                        </div>
                        <!-- /.postafter-lt -->

                    </div>
                    <!-- /.main-left -->
                    <!-- left /end -->


                    <div class="main-right">

                        <div class="postafter-rt">
                            <div class="tofu jobcom">
                                <div class="tofu-title">岗位发布企业</div>
                                <div class="jobcom-logo">
                                    
                                    <img :src="'https://www.aizhaopin.pro/prod-api/sys/common/static/'+postInfo.enterprise.logo">
                              

                                </div>
                                <h3>{{postInfo.enterprise.name}}</h3>
                                <p>
                                    <span>擅长行业：
                                        </span>{{postInfo.enterprise.enterpriseIndustry}}
                                </p>
                                
                                  
                                

                              
                                
                            </div>
                            <div class="tofu jobcom">
                                <div class="tofu_head">
                                    <div class="tofu-title">岗位批注</div>
                                    <div class="tofu_btn" @click="showAdd">
                                        <span>+</span>
                                    </div>
                                </div>

                                <div class="tofu_list">

                                    <div class="add_main" v-if="showAddTextArea">
                                        <div class="am_textarea">
                                            <textarea v-model="form.content" placeholder="请输入批注"></textarea>
                                        </div>
                                        <div class="am_btn_list">
                                            <div class="hmrchr_div" @click="saveIntemal">
                                                <span>保存</span>
                                            </div>
                                            <div class="hmrchr_div" @click="cancelSave">
                                                <span>取消</span>
                                            </div>
                                        </div>
                                    </div>

                                    <template v-for="item in intemalList">
                                        <div class="tf_content">
                                            <div class="tfc_txt">
                                                <span>{{item.content}}</span>
                                            </div>
                                            <div class="tfc_bottom">
                                                <div class="tfcb_left">
                                                    <span>{{item.name}}</span>
                                                </div>
                                                <div class="tfcb_name">
                                                    <span>{{item.createTime.substring(0,16)}}</span>
                                                </div>
                                            </div>
                                        </div>
                                    </template>
                                    <div class="no_data" v-if="intemalList.length==0">
                                        <span>暂无批注</span>
                                    </div>
                                </div> 
                            </div>
                 

                        </div>
                        <!-- /.postafter-rt -->

                    </div>
                    <!-- /.main-right -->
                    <!-- right /end --> 


                </div>
                <post-footer-main-vue></post-footer-main-vue>



            </div>


            <el-dialog title="岗位推荐" :visible.sync="dialogFormVisible" width="600px">
                <el-form :model="form" style="display:inline-block">
                    <el-form-item label="被推荐人姓名" :label-width="formLabelWidth" style="width:100%;float:left">
                        <el-input v-model="childForm.name" autocomplete="off"></el-input>
                    </el-form-item>
                    <el-form-item label="被推荐人手机号" :label-width="formLabelWidth" style="width:100%;float:left">
                        <el-input v-model="childForm.phone" autocomplete="off"></el-input>
                    </el-form-item>
                   

                    <el-form-item label="被推荐人邮箱" :label-width="formLabelWidth" style="width:100%;float:left">
                
                        <el-input v-model="childForm.email" autocomplete="off"></el-input>
                      

                    </el-form-item>




                </el-form>
                <div slot="footer" class="dialog-footer">
                    <el-button @click="dialogFormVisible = false">取 消</el-button>
                    <el-button type="primary" @click="saveChildCompany">确 定</el-button>
                </div>
            </el-dialog>
      
    </div>
</template>
  
<script>
    import postHead from '@/components/postHead.vue';
    import homeapi from '@/api/api.js'
    import postFooterMainVue from '@/components/postFooterMain.vue';
    import userHead from '@/components/userHead.vue';
    export default {
        name: 'postinfo',
        components: {
            postHead,
            postFooterMainVue,
            userHead
        },
        data(){
            return {
                postInfo:{
                    enterprise:{},
                    universityType:[],
                    masterSchoolType:[],
                    doctorSchoolType:[],
                    subsidiary:{},
                    experienceRequirements:{},
                    currentWorkplaceRequirements:[],
                },
                moneyInfo:{},
                postMain:{},
                dictInfo:{},
                showAddTextArea:false,
                form:{
                    content:"",
                },
                intemalList:[],

                spanList:["登","录","公","众","号","，","转","发","、","推","荐","，","赢","奖","金"],
                nowIndex:0,
                reSumeInfo:{},
                dialogFormVisible:false,
                childForm:{

                },
                formLabelWidth:'120px'
            }
        },
        mounted(){
            this.getPostInfo();
            this.getMoneyInfo();
            this.getPostMain();
            this.getDictList();
            this.getIntemalList();
            this.changeFontSize();
            console.log("bbbbbbbbbbbbb")
            console.log(this.$root.userInfo)
          
                this.getResume();
            

        },
        methods:{
            async saveChildCompany(){
                let form=this.childForm;
                let data=await homeapi.invitationPost(form)
                if(data.code==200){

                    this.$message.success("邀请成功")
                    this.dialogFormVisible=false
                }
            },
            showSendPost(){
                this.dialogFormVisible=true;
                this.childForm={
                    phone:'',
                    enterpriseId:this.postMain.companyId,
                    positionId:this.$route.query.id,
                    name:"",
                    email:'',
                }

            },
            getOther(content){
                const plainText = this.htmlToText(content)
                return plainText
            },
            htmlToText(html) {  
                if(html){

                
                return html  
                    .replace(/<[^>]*>/g, '') // 移除所有HTML标签  
                    .replace(/&nbsp;/gi, ' ') // 将HTML实体转换为字符  
                    .replace(/<br\s*\/?>/gi, '\n') // 将换行符替换为实际的换行符  
                    // ... 可以添加更多替换规则来处理其他HTML实体或特殊字符  
                    ;  
                    }
            },

            getSpaceInfo(workSpace){
              
                let workPlaceList=[]
                if(workSpace){

               
                workSpace.map(res=>{
                    if(res){
                        if(res.indexOf('中国')>-1){
                            const nameList=res.split("/")
                            let name=nameList.splice(2,nameList.length).join("-");
                            
                            workPlaceList.push(name)
                        }
                        else{
                            const nameList=res.split("/")
                            let name=nameList.join("-");
                            workPlaceList.push(name)
                        }
                    }
                   
                })
                 }
                return workPlaceList.join(" 或 ")
              
            },

            getWorkSpace(workPlace){
                if(workPlace){
                    let workPlaceName=workPlace.split(",");
                    let workPlaceList=[]
                    workPlaceName.map(res=>{
                        if(res){
                            if(res.indexOf('中国')>-1){
                                const nameList=res.split("/")
                                let name=nameList.splice(2,nameList.length).join("-");
                                
                                workPlaceList.push(name)
                            }
                            else{
                                const nameList=res.split("/")
                                let name=nameList.join("-");
                                workPlaceList.push(name)
                            }
                        }
                        
                    
                    })
                    return workPlaceList.join(",")
                }
                
               
            },

             changeFontSize(){
                if(this.nowIndex<this.spanList.length-1){
                    if(this.spanList[this.nowIndex]=='，' || this.spanList[this.nowIndex]=='、'){
                         this.nowIndex=this.nowIndex+1;
                        this.changeFontSize();
                    }
                    else{
                        setTimeout(()=>{
                            this.nowIndex=this.nowIndex+1;
                            this.changeFontSize();
                        },500)
                    }
                   
                    
                }
                else{
                    setTimeout(()=>{
                        this.nowIndex=0;
                        this.changeFontSize();
                    },500)
                }
                
            },
            showAdd(){
                this.showAddTextArea=true;
                this.form={
                    content:"",
                }
            },
            async loadPost(){
                let ids=[this.$route.query.id]
                let data=await homeapi.loadPost({ids})
                console.log(data)
                if(data.code==200){
                    this.getPostInfo()
                    this.getPostMain()
                }
            },
            cancelSave(){
                this.showAddTextArea=false
            },
            async saveIntemal(){
                let form=this.form;
                form.mainId=this.$route.query.id
                let data=await homeapi.saveIntemal(form)
                if(data.code==200){
                    this.cancelSave();
                    this.getIntemalList();
                }
            },
            toEdit(){
                
                this.$router.push("/post/edit?id="+this.$route.query.id)
                // window.open("/#)
            },

            async getIntemalList(){
                let id=this.$route.query.id
                const data=await homeapi.getIntemalList({id});
                if(data.code==200){
                    this.intemalList=data.result
                }
            },

            //删除岗位
            async deletePost(){
                this.$confirm('此操作将删除该岗位, 是否继续?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(async () => {
                    let ids=this.$route.query.id
                   const data=await homeapi.deletePost({ids})
                   if(data.code==200){
                       window.close();
                   }
                }).catch(() => {
                           
                });
            },

            //停止发布

            async stopPost(status){
                let ids=[this.$route.query.id]
                
                const data=await homeapi.changePost({ids,status});
                if (data.code == 200) {
                   this.$message.success("操作成功")
                   this.getPostInfo();
                   this.getPostMain();
                }
            },
             //获取数据字典
            async getDictList() {
                let data = await homeapi.getDictList();
                if (data.code == 200) {
                    this.dictInfo=data.result
                }
            },
            getPostInfoMain(value,type){
                let name=""
                console.log(type)
                if(this.dictInfo[type]){
                    this.dictInfo[type].map(res=>{
                        if(res.value==value){
                            name=res.label
                        }
                    })
                }

                return name
            },

            async getPostInfo(){
                let id=this.$route.query.id;
                let data=await homeapi.getPostInfo({id})
                if(data.code==200){
                    this.postInfo=data.result
                }
            },
            async getMoneyInfo(){
                let id=this.$route.query.id;
                const data=await homeapi.getMoneyInfo({id})
                 if(data.code==200){
                    this.moneyInfo=data.result
                }
            },
            //获取岗位信息
            async getPostMain(){
                let id=this.$route.query.id
                const data=await homeapi.getPostMain({id})
                if(data.code==200){
                    this.postMain=data.result
                }
            },

            //获取简历信息
            async getResume(){
                let data=await homeapi.getLitterSume();
                if(data.code==200){
                    this.reSumeInfo=data.result;
                }
            },
            //获取该岗位是否申请过


            //申请岗位
            async toSendResume(){

                if(this.reSumeInfo.id){
                    this.$confirm('是否确认申请该岗位?', '重要提示', {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                        type: 'warning'
                    }).then(async () => {
                        let infoId=this.$route.query.id
                        let data=await homeapi.sendResume({infoId});
                        if(data.code==200){
                            this.$message.success("投递成功")
                        }   
                    }).catch(() => {
                                  
                    });
                }
                else{
                    this.$confirm('您还未完善简历,是否现在去完善简历?', '重要提示', {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                        type: 'warning'
                    }).then(() => {
                        this.$router.push("/user/userReme")
                           
                    }).catch(() => {
                                  
                    });
                }
            },
           
        }
    }
</script>
<style scoped lang="less">
    .overdiv{
        margin-top: 30px;
        width: 100%;
        height: calc(100vh - 110px);
        overflow-y: auto;
    }
    .btn-default{
        margin-left: 10px;
    }
    .job_solgan{
        padding-left: 20px;
        box-sizing: border-box;
    }
    .post_img{
        width: 100%;
        padding-left: 20px;
        box-sizing: border-box;
        margin-top: 20px;
    }
    .post_img img{
        width: 600px;
    }
    .tofu_head{
        width: 100%;
        display: flex;
        align-content:center;
        justify-content: space-between;
    }
    .tofu_btn{
        width: 40px;
        height: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 16px;
        border: 1px solid #FC7B24;
        color: #FC7B24;
        border-radius: 5px;
        cursor: pointer;
    }
    .hmrchr_div {
        width: 72px;
        height: 34px;
        background: #F5792A;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        color: #FFFFFF;
        margin-right: 16px;
        cursor: pointer;
    }
    .am_textarea{
        width: 100%;
        height: 150px;
    }
    .am_textarea textarea{
        width: 100%;
        border: 1px solid #e6e6e6;
        height: 100%;
        outline: none;
        resize: none;
        padding: 10px 15px;
    }
    .am_btn_list{
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        margin-top: 10px;
    }
    .tfc_txt{
        font-size: 16px;
        color: #333333;
        line-height: 18px;
    }
    .tf_content{
        padding-bottom: 15px;
        border-bottom:1px solid #e6e6e6;
        margin-top: 10px;
    }
    .tfc_bottom{
        width: 100%;
        display: flex;
        align-content: center;
        justify-content: space-between;
        margin-top: 10px;
         font-size: 14px;
        color: #666666;
       

    }
    .tfcb_left{
        font-size: 14px;
        color: #666666;
    }
    .no_data{
        width: 100%;
        display: flex;
        align-content: center;
        justify-content: center;
        font-size: 16px;
        color: #666666;
        margin-top: 30px;
        margin-bottom: 30px;
    }
    .jobinfo-list{
        background: #ffffff;
    }
    .jobinfo-list li{
        padding: 0px;
        border: 0px;
    }
    .jobinfo-list li .jobstate{
        line-height: 1.42857143;
        padding: 10px;
        list-style: none;
       
    }
    .jobinfo-list li{
        border-bottom: 1px solid #ddd;
    }
    .mony_div{
        width: 100%;
        height: 148px;
        background: url("../../assets/imgs/info_head.jpg");
        background-size: 100% 100%;
       
        display: inline-block;
    }
    .md_head{
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        margin-top: 35px;
        padding-left: 220px;
        box-sizing: border-box;
        font-size: .3733rem;
        color: #F5792A;
        font-weight: 700;
    }
    .md_desc{
         width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        font-size: .3733rem;
        color: #F5792A;
        padding-left: 220px;
         margin-top: 25px;
        box-sizing: border-box;
    }
    .md_desc span{
        margin-right: 5px;
    }
    .bigSpan{
          font-size: 0.4rem;
    }
     @keyframes scanLine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
    }
    
   .q-loading-2-inner {

        font-weight: bold;
        /* 这里可以随意加样式 */
        
        background: #F5792A
            linear-gradient(
            -135deg,
            transparent 25%,
            transparent 40%,
            rgb(205, 3, 3) 40%,/* 这两个值是滑动条的颜色 */
            rgba(205, 3, 3, 0.438) 60%,/* 默认是绿色 自己更改即可 */
            transparent 60%,
            transparent
        );
        background-size: 60px 60px;
        background-repeat: no-repeat;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        animation: scratchy 5s linear infinite;
    }

    @keyframes scratchy {
        0% {
            background-position: -100% 0;
        }
        100% {
            background-position: 130% 0;
        }
    }
    .demand p{
        font-size: 0.32rem;
        font-family: "微软雅黑";
    }
    .boldSpan{
        font-weight: bold;
        color: #000;
        margin: 0 10px;
    }
    .pay_div{
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
    .workspace{
        margin-right: 30px;
        width: 200px;
        height: 30px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .jobstate>span:first-child{
        width: 120px;
    }
    .jobstate>span:last-child {
        width: calc(100% - 120px);
    }
    .jobtitle-info{
        font-weight: bold;
    }
    .register-tag{
        font-weight: bold;
    }
</style>

  